QueryPageInterface queryPageForEntityNamed (String entity, WOSession session); ListPageInterface listPageForEntityNamed (String entity, WOSession session); EditPageInterface editPageForEntityNamed (String entity, WOSession session); InspectPageInterface inspectPageForEntityNamed (String entity, WOSession session); SelectPageInterface selectPageForEntityNamed (String entity, WOSession session); EditRelationshipPageInterface editRelationshipPageForEntityNamed (String entity, WOSession session); QueryAllPageInterface queryAllPage (WOSession session);You can override these methods to customize the component returned. The defaultPage method of the D2W class is also one you might want to override; this method returns the application's default page which, by default, is the query-all page.
If you make a subclass of D2W to override certain methods, make sure you call the setFactory class method with an instance of the new class as argument.
The following example overrides defaultPage:
import com.apple.yellow.foundation.*; import com.apple.yellow.eocontrol.*; import com.apple.yellow.directtoweb.*; import com.apple.yellow.webobjects.*; public class D2WExtendedFactory extends D2W { static { D2W.setFactory(new D2WExtendedFactory()); } public WOComponent defaultPage (WOSession session) { return WOApplication.application().pageWithName("MyDefaultPage", session.context()); } }
Table of Contents
Next Section